# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import HttpResponseRedirect,HttpResponse
from django.shortcuts import render,render_to_response
from Alipay import api_alipay_trade_page_pay
# Create your views here.
def index(request):
    order_string = api_alipay_trade_page_pay()
    print order_string
    redirect_url = 'https://openapi.alipay.com/gateway.do?' + order_string
    return HttpResponseRedirect(redirect_url)

def notify(request):
    print request.POST
    print request.GET
    print request.body
    return render_to_response('notify.html',{'post':request.POST,'get':request.GET,'body':request.body})
